<template>
    <a-card :title="'任务执行情况'+proId" :bordered="false">
        <a-table :dataSource="dataSource" :columns="columns" :pagination="false" class="mb-2">
            <template #bodyCell="{ column, record, index }">
                <template v-if="column.key === 'index'">
                    {{ index + 1 }}
                </template>
            </template>
        </a-table>
    </a-card>
</template>

<script setup name="steps">
const props = defineProps({
    proId: {
        type: Number,
    },
})
const { proId } = toRefs(props)

const columns = [
    {
        title: '序号',
        dataIndex: 'index',
        key: 'index',
    },
    {
        title: '任务名称',
        dataIndex: 'taskname',
        key: 'taskname',
    },
    {
        title: '分配人',
        dataIndex: 'name',
        key: 'name',
    },
    {
        title: '开始时间',
        dataIndex: 'startdate',
        key: 'startdate',
    },
    {
        title: '结束时间',
        dataIndex: 'enddate',
        key: 'enddate',
    },
    {
        title: '进度',
        dataIndex: 'progress',
        key: 'progress',
    },
]
const dataSource = [
    {
        key: '1',
        taskname: "项目立项",
        name: '张明2',
        startdate: '2023-09-01',
        enddate: '2023-10-01',
        progress: '100',
    },
    {
        key: '2',
        taskname: "投标",
        name: '张明',
        startdate: '2023-10-01',
        enddate: '2023-11-01',
        progress: '100',
    },
    {
        key: '3',
        taskname: "施工合同编制",
        name: '张明',
        startdate: '2023-11-01',
        enddate: '2023-12-01',
        progress: '100',
    },
    {
        key: '4',
        taskname: "初审报告编制",
        name: '张明',
        startdate: '2023-12-01',
        enddate: '2024-01-01',
        progress: '50',
    },
]
const getStep = (pId) => {
    console.log("fatch proId", pId)
}
watch(proId, () => {
    getStep(proId.value);
});
</script>
<style scoped></style>
